//
//  ClikeBoundsTableViewCell.m
//  AndCampus
//
//  Created by 史宵宵 on 2017/12/27.
//  Copyright © 2017年 史宵宵. All rights reserved.
//

#import "ClipBoundsTableViewCell.h"

@implementation ClipBoundsTableViewCell
- (void)setFrame:(CGRect)frame {
    
    if (frame.origin.x==0) {
        frame.origin.x += 10;
    }
    if (frame.size.width == kScreenW) {

        frame.size.width -= 2 * 10;
    }
    
    [super setFrame:frame];
    
}
+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"cell";
    ClipBoundsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        
        cell = [[ClipBoundsTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    return cell;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle=UITableViewCellSelectionStyleNone;
        self.accessoryType = UITableViewCellAccessoryNone;
//        self.backgroundColor = KBACKGROUNDCOLOR;
        self.clipsToBounds = YES;
        self.layer.cornerRadius = 10;
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
